package com.hydl.power.service.impl;

import com.hydl.power.mapper.CarMapper;
import com.hydl.power.service.CarService;
import com.hydl.power.utils.Resp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CarServiceImpl implements CarService {
    @Autowired
    private CarMapper carMapper;

    @Override
    public Resp selectAll() {
        List list = carMapper.selectAll();
        if (list.size() > 0) {
            return Resp.success(list);
        } else {
            return Resp.fail("查询失败");
        }
    }
}
